package com.mingqijia.gassafety.db.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.mingqijia.gassafety.db.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * <p>
 * 报警器设备故障记录
 * </p>
 *
 * @author wanghai
 * @since 2023-03-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_history_broken")
@ApiModel(value="HistoryBroken对象", description="报警器设备故障记录")
public class HistoryBroken extends BaseEntity {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "主键")
      @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "报警器设备主键")
    @TableField("device_id")
    private String deviceId;

    @ApiModelProperty(value = "设备号")
    @TableField("iMEI")
    private String iMEI;

    @ApiModelProperty(value = "客户id")
    @TableField("consumer_id")
    private Integer consumerId;

    @ApiModelProperty(value = "故障原因")
    @TableField("reason")
    private String reason;

    @ApiModelProperty(value = "接收器状态 0-离线,1-正常")
    @TableField("receiver_status")
    private Integer receiverStatus;

    @ApiModelProperty(value = "阀门状态 0-开 1-关")
    @TableField("valve_status")
    private Integer valveStatus;

    @ApiModelProperty(value = "故障状态 0-否 1-是")
    @TableField("valve_broken_status")
    private Integer valveBrokenStatus;

    @ApiModelProperty(value = "电磁阀故障原因")
    @TableField("valve_broken_info")
    private String valveBrokenInfo;

    @ApiModelProperty(value = "诉求状态：0待处理 1工单处理中 2已处理 3工单处理完成 4未办结 5已办结")
    @TableField("appeal_status")
    private Integer appealStatus;

    @ApiModelProperty(value = "工单记录表id t_gas_workorder_history.id")
    @TableField("workorder_id")
    private Long workorderId;

    @ApiModelProperty(value = "操作人姓名")
    @TableField("appeal_result")
    private String appealResult;

    @ApiModelProperty(value = "操作人姓名")
    @TableField("user_name")
    private String userName;

    @ApiModelProperty(value = "操作人账号")
    @TableField("user_account")
    private String userAccount;

    @ApiModelProperty(value = "处理时间")
    @TableField("appeal_time")
    private Date appealTime;


}
